import request from "@/utils/request";
import qs from "qs";
// 查询用户
export function userList(params) {
  return request({
    url: "/api/backend/user/page",
    method: "get",
    params,
  });
}
// 添加用户
export function addUserData(data) {
  return request({
    url: "/api/backend/user/add",
    method: "post",
    data: data,
  });
}
// 删除用户
export function delUserData(data) {
  return request({
    // url: `/api/backend/user/batch/?userIds=${userIds}`,
    url: "/api/backend/user/batch",
    method: "delete",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    params: data,
  });
}
// 获取用户
export function queryUser(id) {
  return request({
    // url: `/api/backend/user/batch/?userIds=${userIds}`,
    url: `/api/api/user/${id}`,
    method: "get",
  });
}
// 更新用户
export function updateUser(data) {
  return request({
    // url: `/api/backend/user/batch/?userIds=${userIds}`,
    url: "/api/backend/user/update",
    method: "put",
    data: data,
  });
}
